home *** CD-ROM | disk | FTP | other *** search
/ Freelog 22 / freelog 22.iso / Prog / Djgpp / GPC2952B.ZIP / doc / gpc / docdemos / addrdemo.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  2001-02-09  |  208 b   |  11 lines

  1. program AddrDemo;
  2. var
  3.   Foo: ^Integer;
  4.   Bar: Integer;
  5. begin
  6.   Foo := Addr (Bar);  { Let `Foo' point to `Bar'. }
  7.   Bar := 17;
  8.   Foo^ := 42;  { Change the value of `Bar' to 42 }
  9.   WriteLn (Bar)
  10. end.
  11.